home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / include / stab.h < prev    next >
C/C++ Source or Header  |  1996-01-30  |  8KB  |  190 lines

  1. #ifndef __GNU_STAB__
  2.  
  3. /* Indicate the GNU stab.h is in use.  */
  4.  
  5. #define __GNU_STAB__
  6.  
  7. #define __define_stab(NAME, CODE, STRING) NAME=CODE,
  8.  
  9. enum __stab_debug_code
  10. {
  11. /* Table of DBX symbol codes for the GNU system.
  12.    Copyright (C) 1988 Free Software Foundation, Inc.
  13.  
  14.    This program is free software; you can redistribute it and/or modify
  15.    it under the terms of the GNU General Public License as published by
  16.    the Free Software Foundation; either version 1, or (at your option)
  17.    any later version.
  18.  
  19.    This program is distributed in the hope that it will be useful,
  20.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22.    GNU General Public License for more details.
  23.  
  24.    You should have received a copy of the GNU General Public License
  25.    along with this program; if not, write to the Free Software
  26.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  27.  
  28. /* This contains contribution from Cygnus Support.  */
  29.  
  30. /* Global variable.  Only the name is significant.
  31.    To find the address, look in the corresponding external symbol.  */
  32. __define_stab (N_GSYM, 0x20, "GSYM")
  33.  
  34. /* Function name for BSD Fortran.  Only the name is significant.
  35.    To find the address, look in the corresponding external symbol.  */
  36. __define_stab (N_FNAME, 0x22, "FNAME")
  37.  
  38. /* Function name or text-segment variable for C.  Value is its address.
  39.    Desc is supposedly starting line number, but GCC doesn't set it
  40.    and DBX seems not to miss it.  */
  41. __define_stab (N_FUN, 0x24, "FUN")
  42.  
  43. /* Data-segment variable with internal linkage.  Value is its address.  */
  44. __define_stab (N_STSYM, 0x26, "STSYM")
  45.  
  46. /* BSS-segment variable with internal linkage.  Value is its address.  */
  47. __define_stab (N_LCSYM, 0x28, "LCSYM")
  48.  
  49. /* Name of main routine.  Only the name is significant.
  50.    This is not used in C.  */
  51. __define_stab (N_MAIN, 0x2a, "MAIN")
  52.  
  53. /* Register variable.  Value is number of register.  */
  54. __define_stab (N_RSYM, 0x40, "RSYM")
  55.  
  56. /* Structure or union element.  Value is offset in the structure.  */
  57. __define_stab (N_SSYM, 0x60, "SSYM")
  58.  
  59. /* Parameter variable.  Value is offset from argument pointer.
  60.    (On most machines the argument pointer is the same as the frame pointer.  */
  61. __define_stab (N_PSYM, 0xa0, "PSYM")
  62.  
  63. /* Automatic variable in the stack.  Value is offset from frame pointer.
  64.    Also used for type descriptions.  */
  65. __define_stab (N_LSYM, 0x80, "LSYM")
  66.  
  67. /* Alternate entry point.  Value is its address.  */
  68. __define_stab (N_ENTRY, 0xa4, "ENTRY")
  69.  
  70. /* Name of main source file.
  71.    Value is starting text address of the compilation.  */
  72. __define_stab (N_SO, 0x64, "SO")
  73.  
  74. /* Name of sub-source file.
  75.    Value is starting text address of the compilation.  */
  76. __define_stab (N_SOL, 0x84, "SOL")
  77.  
  78. /* Line number in text segment.  Desc is the line number;
  79.    value is corresponding address.  */
  80. __define_stab (N_SLINE, 0x44, "SLINE")
  81. /* Similar, for data segment.  */
  82. __define_stab (N_DSLINE, 0x46, "DSLINE")
  83. /* Similar, for bss segment.  */
  84. __define_stab (N_BSLINE, 0x48, "BSLINE")
  85.  
  86. /* Beginning of an include file.  Only Sun uses this.
  87.    In an object file, only the name is significant.
  88.    The Sun linker puts data into some of the other fields.  */
  89. __define_stab (N_BINCL, 0x82, "BINCL")
  90. /* End of an include file.  No name.
  91.    These two act as brackets around the file's output.
  92.    In an object file, there is no significant data in this entry.
  93.    The Sun linker puts data into some of the fields.  */
  94. __define_stab (N_EINCL, 0xa2, "EINCL")
  95. /* Place holder for deleted include file.
  96.    This appears only in output from the Sun linker.  */
  97. __define_stab (N_EXCL, 0xc2, "EXCL")
  98.  
  99. /* Beginning of lexical block.
  100.    The desc is the nesting level in lexical blocks.
  101.    The value is the address of the start of the text for the block.
  102.    The variables declared inside the block *precede* the N_LBRAC symbol.  */
  103. __define_stab (N_LBRAC, 0xc0, "LBRAC")
  104. /* End of a lexical block.  Desc matches the N_LBRAC's desc.
  105.    The value is the address of the end of the text for the block.  */
  106. __define_stab (N_RBRAC, 0xe0, "RBRAC")
  107.  
  108. /* Begin named common block.  Only the name is significant.  */
  109. __define_stab (N_BCOMM, 0xe2, "BCOMM")
  110. /* Begin named common block.  Only the name is significant
  111.    (and it should match the N_BCOMM).  */
  112. __define_stab (N_ECOMM, 0xe4, "ECOMM")
  113. /* End common (local name): value is address.
  114.    I'm not sure how this is used.  */
  115. __define_stab (N_ECOML, 0xe8, "ECOML")
  116. /* Second symbol entry containing a length-value for the preceding entry.
  117.    The value is the length.  */
  118. __define_stab (N_LENG, 0xfe, "LENG")
  119.  
  120. /* Global symbol in Pascal.
  121.    Supposedly the value is its line number; I'm skeptical.  */
  122. __define_stab (N_PC, 0x30, "PC")
  123.  
  124. /* Modula-2 compilation unit.  Can someone say what info it contains?  */
  125. __define_stab (N_M2C, 0x42, "M2C")
  126. /* Modula-2 scope information.  Can someone say what info it contains?  */
  127. __define_stab (N_SCOPE, 0xc4, "SCOPE")
  128.  
  129. /* Sun's source-code browser stabs.  ?? Don't know what the fields are.
  130.    Supposedly the field is "path to associated .cb file".  */
  131. /* This conflicts with the definition of N_BSLINE.  */
  132. __define_stab (N_BROWS, 0x48, "BROWS")
  133.  
  134. /* GNU C++ exception stabs.  */
  135.  
  136. /* GNU C++ `catch' clause.  Value is its address.  Desc is nonzero if
  137.    this entry is immediately followed by a CAUGHT stab saying what exception
  138.    was caught.  Multiple CAUGHT stabs means that multiple exceptions
  139.    can be caught here.  If Desc is 0, it means all exceptions are caught
  140.    here.  */
  141. __define_stab (N_CATCH, 0x54, "CATCH")
  142.  
  143. /* The above information, in matrix format.
  144.  
  145.                         STAB MATRIX
  146.         _________________________________________________
  147.         | 00 - 1F are not dbx stab symbols              |
  148.         | Entries with bits 01 set are external symbols |
  149.         | N_UNDEF   | N_ABS     | N_TEXT    | N_DATA    |
  150.         | N_BSS     | N_COMM    |           | N_FN      |
  151.         |_______________________________________________|
  152.         | 20 GSYM   | 22 FNAME  | 24 FUN    | 26 STSYM  |
  153.         | 28 LCSYM  | 2A MAIN   | 2C        | 2E        |
  154.         | 30 PC     | 32        | 34        | 36        |
  155.         | 38        | 3A        | 3C        | 3E        |
  156.         | 40 RSYM   | 42 M2C    | 44 SLINE  | 46 DSLINE |
  157.         | 48 BROWS/BSLINE | 4A  | 4C        | 4E        |
  158.         | 50 EHDECL | 52        | 54 CATCH  | 56        |
  159.         | 58        | 5A        | 5C        | 5E        |
  160.         | 60 SSYM   | 62        | 64 SO     | 66        |
  161.         | 68        | 6A        | 6C        | 6E        |
  162.         | 70        | 72        | 74        | 76        |
  163.         | 78        | 7A        | 7C        | 7E        |
  164.         | 80 LSYM   | 82 BINCL  | 84 SOL    | 86        |
  165.         | 88        | 8A        | 8C        | 8E        |
  166.         | 90        | 92        | 94        | 96        |
  167.         | 98        | 9A        | 9C        | 9E        |
  168.         | A0 PSYM   | A2 EINCL  | A4 ENTRY  | A6        |
  169.         | A8        | AA        | AC        | AE        |
  170.         | B0        | B2        | B4        | B6        |
  171.         | B8        | BA        | BC        | BE        |
  172.         | C0 LBRAC  | C2 EXCL   | C4 SCOPE  | C6        |
  173.         | C8        | CA        | CC        | CE        |
  174.         | D0        | D2        | D4        | D6        |
  175.         | D8        | DA        | DC        | DE        |
  176.         | E0 RBRAC  | E2 BCOMM  | E4 ECOMM  | E6        |
  177.         | E8 ECOML  | EA        | EC        | EE        |
  178.         | F0        | F2        | F4        | F6        |
  179.         | F8        | FA        | FC        | FE LENG   |
  180.         +-----------------------------------------------+
  181.  
  182. */
  183. LAST_UNUSED_STAB_CODE
  184. };
  185.  
  186. #undef __define_stab
  187.  
  188. #endif /* __GNU_STAB_ */
  189.  
  190.